const Mock = require("mockjs");
const { Random } = Mock;

module.exports = [
  // 创建问卷
  {
    path: "/api/question",
    method: "post",
    response() {
      return {
        code: 200,
        data: {
          fe_id: Random.id(),
        },
      };
    },
  },
  // 更新问卷
  {
    path: "/api/question/:id",
    method: "patch",
    response(ctx) {
      return {
        code: 200,
        data: {},
      };
    },
  },
  // 复制问卷
  {
    path: "/api/question/duplicate/:id",
    method: "post",
    response(ctx) {
      return {
        code: 200,
        data: {
          fe_id: Random.id(),
        },
      };
    },
  },
  // 批量删除问卷
  {
    path: "/api/question",
    method: "delete",
    response(ctx) {
      return {
        code: 200,
        data: {},
      };
    },
  },
];
